<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			/* 利用 margin:auto; */
			.parent {
				width: 500px;
				height: 500px;
				border: 1px solid #000;
				position: relative;
			}

			.child {
				width: 100px;
				height: 100px;
				border: 1px solid #999;
				position: absolute;
				margin: auto;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
			}
		</style>
	</head>
	<body>
		<div class="parent">
			<div class="child"></div>
		</div>
	</body>
</html>
